package com.epam.necklace.view.menu.mainmenu.submenu.submenugems;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import com.epam.necklace.view.menu.Menu;
import com.epam.necklace.view.menu.MenuItem;
import com.epam.necklace.view.menu.mainmenu.submenu.BackMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order4menu.AmethystMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order4menu.QuartzMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenugems.order4menu.RockCrystalMenu;


public class Order4 extends MenuItem {
	private static final Logger log = Logger.getLogger(Order4.class);

	private final Menu subMenu;
	private static final List<MenuItem> items;

	static {
		items = new ArrayList<MenuItem>();
		items.add(new AmethystMenu());
		items.add(new QuartzMenu());
		items.add(new RockCrystalMenu());
		items.add(new BackMenu());
	}

	public Order4() {
		super("Fourth-order", "4");
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		log.info("Fourth-order comand");
		subMenu.run();
		return true;
	}

}
